
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module TileStache.Goodies.VecTiles.topojson</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="TileStache.html"><font color="#ffffff">TileStache</font></a>.<a href="TileStache.Goodies.html"><font color="#ffffff">Goodies</font></a>.<a href="TileStache.Goodies.VecTiles.html"><font color="#ffffff">VecTiles</font></a>.topojson</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="json.html">json</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-decode"><strong>decode</strong></a>(file)</dt><dd><tt>Stub&nbsp;function&nbsp;to&nbsp;decode&nbsp;a&nbsp;TopoJSON&nbsp;file&nbsp;into&nbsp;a&nbsp;list&nbsp;of&nbsp;features.<br>
&nbsp;<br>
Not&nbsp;currently&nbsp;implemented,&nbsp;modeled&nbsp;on&nbsp;geojson.<a href="#-decode">decode</a>().</tt></dd></dl>
 <dl><dt><a name="-diff_encode"><strong>diff_encode</strong></a>(line, transform)</dt><dd><tt>Differentially&nbsp;encode&nbsp;a&nbsp;shapely&nbsp;linestring&nbsp;or&nbsp;ring.</tt></dd></dl>
 <dl><dt><a name="-encode"><strong>encode</strong></a>(file, features, bounds, is_clipped)</dt><dd><tt>Encode&nbsp;a&nbsp;list&nbsp;of&nbsp;(WKB,&nbsp;property&nbsp;dict)&nbsp;features&nbsp;into&nbsp;a&nbsp;TopoJSON&nbsp;stream.<br>
&nbsp;<br>
Also&nbsp;accept&nbsp;three-element&nbsp;tuples&nbsp;as&nbsp;features:&nbsp;(WKB,&nbsp;property&nbsp;dict,&nbsp;id).<br>
&nbsp;<br>
Geometries&nbsp;in&nbsp;the&nbsp;features&nbsp;list&nbsp;are&nbsp;assumed&nbsp;to&nbsp;be&nbsp;unprojected&nbsp;lon,&nbsp;lats.<br>
Bounds&nbsp;are&nbsp;given&nbsp;in&nbsp;geographic&nbsp;coordinates&nbsp;as&nbsp;(xmin,&nbsp;ymin,&nbsp;xmax,&nbsp;ymax).</tt></dd></dl>
 <dl><dt><a name="-get_tiles"><strong>get_tiles</strong></a>(names, config, coord)</dt><dd><tt>Retrieve&nbsp;a&nbsp;list&nbsp;of&nbsp;named&nbsp;TopoJSON&nbsp;layer&nbsp;tiles&nbsp;from&nbsp;a&nbsp;TileStache&nbsp;config.<br>
&nbsp;<br>
Check&nbsp;integrity&nbsp;and&nbsp;compatibility&nbsp;of&nbsp;each,&nbsp;looking&nbsp;at&nbsp;known&nbsp;layers,<br>
correct&nbsp;JSON&nbsp;mime-types,&nbsp;"Topology"&nbsp;in&nbsp;the&nbsp;type&nbsp;attributes,&nbsp;and<br>
matching&nbsp;affine&nbsp;transformations.</tt></dd></dl>
 <dl><dt><a name="-get_transform"><strong>get_transform</strong></a>(bounds, size<font color="#909090">=1024</font>)</dt><dd><tt>Return&nbsp;a&nbsp;TopoJSON&nbsp;transform&nbsp;dictionary&nbsp;and&nbsp;a&nbsp;point-transforming&nbsp;function.<br>
&nbsp;<br>
Size&nbsp;is&nbsp;the&nbsp;tile&nbsp;size&nbsp;in&nbsp;pixels&nbsp;and&nbsp;sets&nbsp;the&nbsp;implicit&nbsp;output&nbsp;resolution.</tt></dd></dl>
 <dl><dt><a name="-merge"><strong>merge</strong></a>(file, names, config, coord)</dt><dd><tt>Retrieve&nbsp;a&nbsp;list&nbsp;of&nbsp;TopoJSON&nbsp;tile&nbsp;responses&nbsp;and&nbsp;merge&nbsp;them&nbsp;into&nbsp;one.<br>
&nbsp;<br>
<a href="#-get_tiles">get_tiles</a>()&nbsp;retrieves&nbsp;data&nbsp;and&nbsp;performs&nbsp;basic&nbsp;integrity&nbsp;checks.</tt></dd></dl>
 <dl><dt><a name="-update_arc_indexes"><strong>update_arc_indexes</strong></a>(geometry, merged_arcs, old_arcs)</dt><dd><tt>Updated&nbsp;geometry&nbsp;arc&nbsp;indexes,&nbsp;and&nbsp;add&nbsp;arcs&nbsp;to&nbsp;merged_arcs&nbsp;along&nbsp;the&nbsp;way.<br>
&nbsp;<br>
Arguments&nbsp;are&nbsp;modified&nbsp;in-place,&nbsp;and&nbsp;nothing&nbsp;is&nbsp;returned.</tt></dd></dl>
</td></tr></table>
</body></html>